]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ShellWindowTracker: Ensure WM_CLASS remains canonical if it matches
authorColin Walters <walters@verbum.org>
Tue, 5 Apr 2011 16:48:44 +0000 (12:48 -0400)
committerColin Walters <walters@verbum.org>
Wed, 20 Apr 2011 19:04:57 +0000 (15:04 -0400)
I unintentionally made .desktop->pid association "win" over
WM_CLASS.  Fixing this makes the case of ancillary .desktop file
entry points (e.g. gnome-control-center's various shortcut .desktop
files) correctly show System Settings, and not whatever the shortcut
is.

In the future I'd like to have a way to say "this .desktop file
is a shortcut, ignore me" or something.

https://bugzilla.gnome.org/show_bug.cgi?id=646689

src/shell-window-tracker.c

index 9b24cdc0a3b6b7f53e9e5fac1d1bcd5777069f93..d2983beed2950be72c70dc040a723a56d6770dba 100644 (file)
@@ -429,12 +429,14 @@ get_app_for_window (ShellWindowTracker    *monitor,
         }
     }
 
-  result = get_app_from_window_pid (monitor, window);
+  /* Check if the app's WM_CLASS specifies an app; this is
+   * canonical if it does.
+   */
+  result = get_app_from_window_wmclass (window);
   if (result != NULL)
     return result;
 
-  /* Check if the app's WM_CLASS specifies an app */
-  result = get_app_from_window_wmclass (window);
+  result = get_app_from_window_pid (monitor, window);
   if (result != NULL)
     return result;